Left Termination of the query pattern parse_in_2(g, a) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

parse(Xs, T) :- ','(app(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs), ','(app(As, cons(s(a, s(A, B, C), b), Bs), Ys), parse(Ys, T))).
parse(Xs, T) :- ','(app(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs), ','(app(As, cons(s(a, s(A, B), b), Bs), Ys), parse(Ys, T))).
parse(Xs, T) :- ','(app(As, cons(a, cons(b, Bs)), Xs), ','(app(As, cons(s(a, b), Bs), Ys), parse(Ys, T))).
parse(cons(s(A, B), nil), s(A, B)).
parse(cons(s(A, B, C), nil), s(A, B, C)).
app(nil, X, X).
app(cons(X, Xs), Ys, cons(X, Zs)) :- app(Xs, Ys, Zs).

Queries:

parse(g,a).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PARSE_IN(Xs, T) → U71(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(b, Bs)), Xs)
APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → U101(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → APP_IN(Xs, Ys, Zs)
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U81(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → APP_IN(As, cons(s(a, b), Bs), Ys)
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U91(Xs, T, parse_in(Ys, T))
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U41(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U51(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → APP_IN(As, cons(s(a, s(A, B), b), Bs), Ys)
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U61(Xs, T, parse_in(Ys, T))
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U11(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U21(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → APP_IN(As, cons(s(a, s(A, B, C), b), Bs), Ys)
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U31(Xs, T, parse_in(Ys, T))
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → PARSE_IN(Ys, T)

The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)
U61(x1, x2, x3)  =  U61(x3)
U51(x1, x2, x3)  =  U51(x3)
U71(x1, x2, x3)  =  U71(x3)
U101(x1, x2, x3, x4, x5)  =  U101(x5)
U31(x1, x2, x3)  =  U31(x3)
U41(x1, x2, x3)  =  U41(x3)
PARSE_IN(x1, x2)  =  PARSE_IN
U81(x1, x2, x3)  =  U81(x3)
U91(x1, x2, x3)  =  U91(x3)
U21(x1, x2, x3)  =  U21(x3)
U11(x1, x2, x3)  =  U11(x3)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

PARSE_IN(Xs, T) → U71(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(b, Bs)), Xs)
APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → U101(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → APP_IN(Xs, Ys, Zs)
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U81(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → APP_IN(As, cons(s(a, b), Bs), Ys)
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U91(Xs, T, parse_in(Ys, T))
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U41(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U51(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → APP_IN(As, cons(s(a, s(A, B), b), Bs), Ys)
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U61(Xs, T, parse_in(Ys, T))
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U11(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U21(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → APP_IN(As, cons(s(a, s(A, B, C), b), Bs), Ys)
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U31(Xs, T, parse_in(Ys, T))
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → PARSE_IN(Ys, T)

The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)
U61(x1, x2, x3)  =  U61(x3)
U51(x1, x2, x3)  =  U51(x3)
U71(x1, x2, x3)  =  U71(x3)
U101(x1, x2, x3, x4, x5)  =  U101(x5)
U31(x1, x2, x3)  =  U31(x3)
U41(x1, x2, x3)  =  U41(x3)
PARSE_IN(x1, x2)  =  PARSE_IN
U81(x1, x2, x3)  =  U81(x3)
U91(x1, x2, x3)  =  U91(x3)
U21(x1, x2, x3)  =  U21(x3)
U11(x1, x2, x3)  =  U11(x3)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 10 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → APP_IN(Xs, Ys, Zs)

The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → APP_IN(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

APP_INAPP_IN

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP_INAPP_IN

The TRS R consists of the following rules:none


s = APP_IN evaluates to t =APP_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP_IN to APP_IN.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

PARSE_IN(Xs, T) → U71(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U11(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U21(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U41(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → PARSE_IN(Ys, T)
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U81(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U51(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))

The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)
U51(x1, x2, x3)  =  U51(x3)
U71(x1, x2, x3)  =  U71(x3)
U41(x1, x2, x3)  =  U41(x3)
PARSE_IN(x1, x2)  =  PARSE_IN
U81(x1, x2, x3)  =  U81(x3)
U21(x1, x2, x3)  =  U21(x3)
U11(x1, x2, x3)  =  U11(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

PARSE_IN(Xs, T) → U71(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U11(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U21(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U41(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → PARSE_IN(Ys, T)
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U81(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U51(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))

The TRS R consists of the following rules:

app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))

The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
s(x1, x2)  =  s(x1, x2)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U51(x1, x2, x3)  =  U51(x3)
U71(x1, x2, x3)  =  U71(x3)
U41(x1, x2, x3)  =  U41(x3)
PARSE_IN(x1, x2)  =  PARSE_IN
U81(x1, x2, x3)  =  U81(x3)
U21(x1, x2, x3)  =  U21(x3)
U11(x1, x2, x3)  =  U11(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U71(app_out) → U81(app_in)
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(app_in)
PARSE_INU11(app_in)
U81(app_out) → PARSE_IN
PARSE_INU71(app_in)
U21(app_out) → PARSE_IN
PARSE_INU41(app_in)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PARSE_INU71(app_in) at position [0] we obtained the following new rules:

PARSE_INU71(app_out)
PARSE_INU71(U10(app_in))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U71(app_out) → U81(app_in)
PARSE_INU71(app_out)
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(app_in)
PARSE_INU11(app_in)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
PARSE_INU41(app_in)
PARSE_INU71(U10(app_in))

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PARSE_INU11(app_in) at position [0] we obtained the following new rules:

PARSE_INU11(app_out)
PARSE_INU11(U10(app_in))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
U71(app_out) → U81(app_in)
U41(app_out) → U51(app_in)
PARSE_INU71(app_out)
U51(app_out) → PARSE_IN
U11(app_out) → U21(app_in)
PARSE_INU11(app_out)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
PARSE_INU41(app_in)
PARSE_INU71(U10(app_in))

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U11(app_out) → U21(app_in) at position [0] we obtained the following new rules:

U11(app_out) → U21(app_out)
U11(app_out) → U21(U10(app_in))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
U71(app_out) → U81(app_in)
PARSE_INU71(app_out)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU41(app_in)
PARSE_INU71(U10(app_in))
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PARSE_INU41(app_in) at position [0] we obtained the following new rules:

PARSE_INU41(U10(app_in))
PARSE_INU41(app_out)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
U71(app_out) → U81(app_in)
PARSE_INU41(app_out)
PARSE_INU71(app_out)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU71(U10(app_in))
PARSE_INU41(U10(app_in))
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U71(app_out) → U81(app_in) at position [0] we obtained the following new rules:

U71(app_out) → U81(U10(app_in))
U71(app_out) → U81(app_out)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ Narrowing
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
PARSE_INU71(app_out)
PARSE_INU41(app_out)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU71(U10(app_in))
PARSE_INU41(U10(app_in))
U71(app_out) → U81(U10(app_in))
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)
U71(app_out) → U81(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U41(app_out) → U51(app_in) at position [0] we obtained the following new rules:

U41(app_out) → U51(U10(app_in))
U41(app_out) → U51(app_out)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
QDP
                                                ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
PARSE_INU41(app_out)
PARSE_INU71(app_out)
U41(app_out) → U51(U10(app_in))
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU71(U10(app_in))
PARSE_INU41(U10(app_in))
U71(app_out) → U81(U10(app_in))
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)
U71(app_out) → U81(app_out)
U41(app_out) → U51(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
PARSE_INU41(app_out)
PARSE_INU71(app_out)
U41(app_out) → U51(U10(app_in))
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU71(U10(app_in))
PARSE_INU41(U10(app_in))
U71(app_out) → U81(U10(app_in))
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)
U71(app_out) → U81(app_out)
U41(app_out) → U51(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out


s = U41(app_out) evaluates to t =U41(app_out)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U41(app_out)U51(app_out)
with rule U41(app_out) → U51(app_out) at position [] and matcher [ ]

U51(app_out)PARSE_IN
with rule U51(app_out) → PARSE_IN at position [] and matcher [ ]

PARSE_INU41(app_out)
with rule PARSE_INU41(app_out)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PARSE_IN(Xs, T) → U71(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(b, Bs)), Xs)
APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → U101(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → APP_IN(Xs, Ys, Zs)
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U81(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → APP_IN(As, cons(s(a, b), Bs), Ys)
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U91(Xs, T, parse_in(Ys, T))
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U41(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U51(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → APP_IN(As, cons(s(a, s(A, B), b), Bs), Ys)
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U61(Xs, T, parse_in(Ys, T))
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U11(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U21(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → APP_IN(As, cons(s(a, s(A, B, C), b), Bs), Ys)
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U31(Xs, T, parse_in(Ys, T))
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → PARSE_IN(Ys, T)

The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)
U61(x1, x2, x3)  =  U61(x3)
U51(x1, x2, x3)  =  U51(x3)
U71(x1, x2, x3)  =  U71(x3)
U101(x1, x2, x3, x4, x5)  =  U101(x5)
U31(x1, x2, x3)  =  U31(x3)
U41(x1, x2, x3)  =  U41(x3)
PARSE_IN(x1, x2)  =  PARSE_IN
U81(x1, x2, x3)  =  U81(x3)
U91(x1, x2, x3)  =  U91(x3)
U21(x1, x2, x3)  =  U21(x3)
U11(x1, x2, x3)  =  U11(x3)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

PARSE_IN(Xs, T) → U71(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(b, Bs)), Xs)
APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → U101(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → APP_IN(Xs, Ys, Zs)
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U81(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → APP_IN(As, cons(s(a, b), Bs), Ys)
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U91(Xs, T, parse_in(Ys, T))
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U41(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U51(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → APP_IN(As, cons(s(a, s(A, B), b), Bs), Ys)
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U61(Xs, T, parse_in(Ys, T))
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U11(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
PARSE_IN(Xs, T) → APP_IN(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U21(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → APP_IN(As, cons(s(a, s(A, B, C), b), Bs), Ys)
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U31(Xs, T, parse_in(Ys, T))
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → PARSE_IN(Ys, T)

The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)
U61(x1, x2, x3)  =  U61(x3)
U51(x1, x2, x3)  =  U51(x3)
U71(x1, x2, x3)  =  U71(x3)
U101(x1, x2, x3, x4, x5)  =  U101(x5)
U31(x1, x2, x3)  =  U31(x3)
U41(x1, x2, x3)  =  U41(x3)
PARSE_IN(x1, x2)  =  PARSE_IN
U81(x1, x2, x3)  =  U81(x3)
U91(x1, x2, x3)  =  U91(x3)
U21(x1, x2, x3)  =  U21(x3)
U11(x1, x2, x3)  =  U11(x3)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 10 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → APP_IN(Xs, Ys, Zs)

The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN(cons(X, Xs), Ys, cons(X, Zs)) → APP_IN(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
APP_IN(x1, x2, x3)  =  APP_IN

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APP_INAPP_IN

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP_INAPP_IN

The TRS R consists of the following rules:none


s = APP_IN evaluates to t =APP_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP_IN to APP_IN.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

PARSE_IN(Xs, T) → U71(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U11(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U21(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U41(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → PARSE_IN(Ys, T)
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U81(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U51(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))

The TRS R consists of the following rules:

parse_in(cons(s(A, B, C), nil), s(A, B, C)) → parse_out(cons(s(A, B, C), nil), s(A, B, C))
parse_in(cons(s(A, B), nil), s(A, B)) → parse_out(cons(s(A, B), nil), s(A, B))
parse_in(Xs, T) → U7(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))
U7(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U8(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U8(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → U9(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U4(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U4(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U5(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))
U5(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → U6(Xs, T, parse_in(Ys, T))
parse_in(Xs, T) → U1(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U1(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U2(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U2(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → U3(Xs, T, parse_in(Ys, T))
U3(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U6(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)
U9(Xs, T, parse_out(Ys, T)) → parse_out(Xs, T)

The argument filtering Pi contains the following mapping:
parse_in(x1, x2)  =  parse_in
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
parse_out(x1, x2)  =  parse_out
s(x1, x2)  =  s(x1, x2)
U7(x1, x2, x3)  =  U7(x3)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U8(x1, x2, x3)  =  U8(x3)
U9(x1, x2, x3)  =  U9(x3)
U4(x1, x2, x3)  =  U4(x3)
U5(x1, x2, x3)  =  U5(x3)
U6(x1, x2, x3)  =  U6(x3)
U1(x1, x2, x3)  =  U1(x3)
U2(x1, x2, x3)  =  U2(x3)
U3(x1, x2, x3)  =  U3(x3)
U51(x1, x2, x3)  =  U51(x3)
U71(x1, x2, x3)  =  U71(x3)
U41(x1, x2, x3)  =  U41(x3)
PARSE_IN(x1, x2)  =  PARSE_IN
U81(x1, x2, x3)  =  U81(x3)
U21(x1, x2, x3)  =  U21(x3)
U11(x1, x2, x3)  =  U11(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

PARSE_IN(Xs, T) → U71(Xs, T, app_in(As, cons(a, cons(b, Bs)), Xs))
U21(Xs, T, app_out(As, cons(s(a, s(A, B, C), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U11(Xs, T, app_in(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs))
U11(Xs, T, app_out(As, cons(a, cons(s(A, B, C), cons(b, Bs))), Xs)) → U21(Xs, T, app_in(As, cons(s(a, s(A, B, C), b), Bs), Ys))
U51(Xs, T, app_out(As, cons(s(a, s(A, B), b), Bs), Ys)) → PARSE_IN(Ys, T)
PARSE_IN(Xs, T) → U41(Xs, T, app_in(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs))
U81(Xs, T, app_out(As, cons(s(a, b), Bs), Ys)) → PARSE_IN(Ys, T)
U71(Xs, T, app_out(As, cons(a, cons(b, Bs)), Xs)) → U81(Xs, T, app_in(As, cons(s(a, b), Bs), Ys))
U41(Xs, T, app_out(As, cons(a, cons(s(A, B), cons(b, Bs))), Xs)) → U51(Xs, T, app_in(As, cons(s(a, s(A, B), b), Bs), Ys))

The TRS R consists of the following rules:

app_in(cons(X, Xs), Ys, cons(X, Zs)) → U10(X, Xs, Ys, Zs, app_in(Xs, Ys, Zs))
app_in(nil, X, X) → app_out(nil, X, X)
U10(X, Xs, Ys, Zs, app_out(Xs, Ys, Zs)) → app_out(cons(X, Xs), Ys, cons(X, Zs))

The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
s(x1, x2, x3)  =  s(x1, x2, x3)
nil  =  nil
s(x1, x2)  =  s(x1, x2)
app_in(x1, x2, x3)  =  app_in
a  =  a
b  =  b
U10(x1, x2, x3, x4, x5)  =  U10(x5)
app_out(x1, x2, x3)  =  app_out
U51(x1, x2, x3)  =  U51(x3)
U71(x1, x2, x3)  =  U71(x3)
U41(x1, x2, x3)  =  U41(x3)
PARSE_IN(x1, x2)  =  PARSE_IN
U81(x1, x2, x3)  =  U81(x3)
U21(x1, x2, x3)  =  U21(x3)
U11(x1, x2, x3)  =  U11(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U71(app_out) → U81(app_in)
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(app_in)
PARSE_INU11(app_in)
U81(app_out) → PARSE_IN
PARSE_INU71(app_in)
U21(app_out) → PARSE_IN
PARSE_INU41(app_in)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PARSE_INU71(app_in) at position [0] we obtained the following new rules:

PARSE_INU71(app_out)
PARSE_INU71(U10(app_in))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U71(app_out) → U81(app_in)
PARSE_INU71(app_out)
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(app_in)
PARSE_INU11(app_in)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
PARSE_INU41(app_in)
PARSE_INU71(U10(app_in))

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PARSE_INU11(app_in) at position [0] we obtained the following new rules:

PARSE_INU11(app_out)
PARSE_INU11(U10(app_in))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
U71(app_out) → U81(app_in)
U41(app_out) → U51(app_in)
PARSE_INU71(app_out)
U51(app_out) → PARSE_IN
U11(app_out) → U21(app_in)
PARSE_INU11(app_out)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
PARSE_INU41(app_in)
PARSE_INU71(U10(app_in))

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U11(app_out) → U21(app_in) at position [0] we obtained the following new rules:

U11(app_out) → U21(app_out)
U11(app_out) → U21(U10(app_in))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
U71(app_out) → U81(app_in)
PARSE_INU71(app_out)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU41(app_in)
PARSE_INU71(U10(app_in))
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule PARSE_INU41(app_in) at position [0] we obtained the following new rules:

PARSE_INU41(U10(app_in))
PARSE_INU41(app_out)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
U71(app_out) → U81(app_in)
PARSE_INU41(app_out)
PARSE_INU71(app_out)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU71(U10(app_in))
PARSE_INU41(U10(app_in))
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U71(app_out) → U81(app_in) at position [0] we obtained the following new rules:

U71(app_out) → U81(U10(app_in))
U71(app_out) → U81(app_out)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
PARSE_INU71(app_out)
PARSE_INU41(app_out)
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU71(U10(app_in))
PARSE_INU41(U10(app_in))
U71(app_out) → U81(U10(app_in))
U41(app_out) → U51(app_in)
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)
U71(app_out) → U81(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U41(app_out) → U51(app_in) at position [0] we obtained the following new rules:

U41(app_out) → U51(U10(app_in))
U41(app_out) → U51(app_out)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
QDP
                                                ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
PARSE_INU41(app_out)
PARSE_INU71(app_out)
U41(app_out) → U51(U10(app_in))
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU71(U10(app_in))
PARSE_INU41(U10(app_in))
U71(app_out) → U81(U10(app_in))
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)
U71(app_out) → U81(app_out)
U41(app_out) → U51(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out

The set Q consists of the following terms:

app_in
U10(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

PARSE_INU11(U10(app_in))
PARSE_INU41(app_out)
PARSE_INU71(app_out)
U41(app_out) → U51(U10(app_in))
U81(app_out) → PARSE_IN
U21(app_out) → PARSE_IN
U11(app_out) → U21(app_out)
PARSE_INU71(U10(app_in))
PARSE_INU41(U10(app_in))
U71(app_out) → U81(U10(app_in))
U51(app_out) → PARSE_IN
U11(app_out) → U21(U10(app_in))
PARSE_INU11(app_out)
U71(app_out) → U81(app_out)
U41(app_out) → U51(app_out)

The TRS R consists of the following rules:

app_inU10(app_in)
app_inapp_out
U10(app_out) → app_out


s = U41(app_out) evaluates to t =U41(app_out)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U41(app_out)U51(app_out)
with rule U41(app_out) → U51(app_out) at position [] and matcher [ ]

U51(app_out)PARSE_IN
with rule U51(app_out) → PARSE_IN at position [] and matcher [ ]

PARSE_INU41(app_out)
with rule PARSE_INU41(app_out)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.